<template>
  <div>
    <div class="app-container">
      <div>
        <mt-field
          v-model="form.username"
          label="用户名"
          placeholder="请输入用户名"
        />
        <Password v-model="form.password" label="密码" />

        <mt-button
          align="center"
          class="el-icon-plus"
          type="primary"
          @click.native="handleLogin"
        >
          登录
        </mt-button>
      </div>
    </div>
  </div>
</template>

<script>
import loginMixin from './loginMixin'
import Password from '@/components3/Field/Password'

export default {
  name: 'AppLogin',
  components: { Password },
  directives: {},
  filters: {},
  mixins: [loginMixin],

  props: {
    // title: { type: String, default: '我的' }
  },

  data() {
    return {
      form: {
        username: 'user1',
        password: '123456'
      }
    }
  },
  computed: {},
  async created() {},

  methods: {
    async handleLogin() {
      return this._handleLogin('user/login', this.form)
    }
  }
}
</script>

<style type="text/css"></style>
